package cn.tedu_two;

import java.io.*;

public class Test3 {
    public static void main(String[] args) throws IOException {
        method();
        method2();
    }
    private static void method() throws IOException {
        OutputStream o=new FileOutputStream("F:\\ideaIO\\1.txt");
        o.write(50);
        o.write(51);
        o.close();
        OutputStream o2=new FileOutputStream("F:\\ideaIO\\1.txt",true);
        o2.write(50);
        o2.write(51);
        o2.close();
       // o.flush();
    }
    private static void method2() throws IOException {
        OutputStream o=new BufferedOutputStream(new FileOutputStream("F:\\ideaIO\\1.txt",true));
        o.write(56);
        o.write(97);
        o.flush();
        //o.close();
    }
}
